package com.zhiyou.test4.controller;

import java.util.HashMap;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhiyou.test4.model.DestModel;
import com.zhiyou.test4.service.IDestService;

@Controller
public class TestController {
	
	@Autowired
	IDestService service;
	
	@RequestMapping("index.do")
	public String index(Model model){
		
		model.addAttribute("T", service.query());
		
		return "index";
	}
	
	@ResponseBody
	@RequestMapping("sex.do")
	public Object sex(String cc,Model model){
		
		HashMap map = new HashMap();
		map.put("ss", cc);
		
		return map;
		
	}
}
